using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Main.controls
{
    public partial class ShowShortPoll : System.Web.UI.UserControl
    {
        private Poll _CurrentPoll;
        public Poll CurrentPoll
        {
            get { return _CurrentPoll; }
            set { _CurrentPoll = value; }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.pollLink.NavigateUrl = "/polls/show.aspx?id=" + CurrentPoll.ID;
            this.pollCreation.Text = CurrentPoll.CreatedOn.ToShortDateString();
            this.pollTime.Text = CurrentPoll.CreatedOn.ToShortTimeString();
            this.title.Text = CurrentPoll.Question;
            this.summary.Text = CurrentPoll.Summary;
            this.createdby.Text = Membership.GetUser((Guid)CurrentPoll.UserID).UserName;
        }
    }
}